package str

/*
时间复杂度:O(N)
空间复杂度:O(1)
 */
func titleToNumber(columnTitle string) int {
	var result int
	for _, si := range columnTitle {
		cur := si - 'A' + 1
		result = result*26 + int(cur)
	}
	return result
}
